package com.gwsdk.paysdk.holder;

import android.app.Activity;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.TextView;

import com.gwsdk.paysdk.utils.GWInflaterUtils;


public class VersionHolder extends BaseHolder<String> {

    private final Context context;
    private TextView tvMchName;
    private LayoutInflater mInflater;

    public VersionHolder(Context context) {
        super(context);
        this.context = context;
    }

    @Override
    protected void refreshView(String s, int position, Activity activity) {
            tvMchName.setText(s);
    }

    @Override
    protected View initView(Context context) {
        mInflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
        View inflate = mInflater.inflate(GWInflaterUtils.getLayout(context,"gw_item_version_tv"), null);
        tvMchName = inflate.findViewById(GWInflaterUtils.getControl(context,"tv_version"));
        return inflate;
    }
}
